package com.can.function;

import java.util.function.Supplier;

/**
 * Supplier 供给型接口：
 * 没有参数，只有返回值
 */
public class SupplierDemo01 {
    public static void main(String[] args) {
//        Supplier<String> supplier = new Supplier<String>() {
//            @Override
//            public String get() {
//                return "1024";
//            }
//        };
        Supplier<String> supplier = ()->{return "1024";};
        System.out.println(supplier.get());
    }
}
